from django.contrib import admin
from django.urls import path, include
from rest_framework_simplejwt.views import (
    TokenObtainPairView,
    TokenRefreshView,
)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/auth/', include([
        path('login/', TokenObtainPairView.as_view(), name='login'), #原本的token获取自定义为login
        path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
        path('users/', include('users.urls')),
    ])),
    path('api/categories/', include('categories.urls')),
    path('api/books/', include('books.urls')),
    path('api/borrowing/', include('borrowing.urls')),
]
